(* generate a random planar polygon, with specified number of sides *) A1 = RandomVariate[NormalDistribution[0,1],500]; A2 = RandomVariate[NormalDistribution[0,1],500]; {B1, B2} = Orthogonalize[{A1, A2}]; C1 = B1^2 - B2^2; C2 = 2 * B1 * B2; Pts = Transpose[{C1, C2}]; SumPts = Join[{{0,0}},Accumulate[Pts]]; ListLinePlot[SumPts]